﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="数据绑定.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            姓名：<asp:TextBox ID="UserName" runat="server"></asp:TextBox><br />
            密码：<asp:TextBox ID="Password" runat="server"></asp:TextBox><br />
            邮箱：<asp:TextBox ID="Email" runat="server"></asp:TextBox><br />
            自我介绍：<asp:TextBox ID="Intro" runat="server"></asp:TextBox><br />
            <asp:Button ID="Submit" runat="server" Text="提交"  OnClick="Submit_Click"/>
            <asp:Literal ID="Return" runat="server"></asp:Literal>
        </div>
        <br />
        <br />
        <br />

        <div>
            姓名：<asp:TextBox ID="ReferByName" runat="server"></asp:TextBox><asp:Button ID="Refer" runat="server" Text="查询" OnClick="Refer_Click"/>
        </div>

        <div>
            <asp:GridView ID="GridView1" runat="server" Height="174px" Width="1000px" AutoGenerateColumns="False" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowUpdating="GridView1_RowUpdating"  >
                <Columns>
                    <asp:BoundField DataField="stu_name" HeaderText="姓名" />
                    <asp:BoundField DataField="password" HeaderText="密码" />
                    <asp:BoundField DataField="email" HeaderText="邮箱" />
                    <asp:BoundField DataField="intro" HeaderText="自我介绍" />
                    <asp:CommandField ShowEditButton="True" />
                    <asp:CommandField ShowDeleteButton="True" />
                </Columns>
            </asp:GridView> 

        </div>
    </form>
</body>
</html>
